<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./clean_style.css">
  <style>
    html,body{
      width: 100%;
      height: 4000px;
    }
    ul{
      display: flex;
      justify-content: space-around;
      padding: 0;
      width: 500px;
      height: 400px;
      margin: 0 auto;
      background-color: brown;
    }
    li{
      height: 25px;
      width: 40px;
      background-color: aqua;
    }
    .active{
      display: block;
    }
    div{
      display: none;
    }
  </style>
</head>
<body>
  <ul>
    <li data-id="1">1</li>
    <li data-id="2">2</li>
    <li data-id="3">3</li>
    <li data-id="4">4</li>
    <li data-id="5">5</li>
  </ul>
  <div class="active">asdassdas1</div>
  <div>asdassdas2</div>
  <div>asdassdas3</div>
  <div>asdassdas4</div>
  <div>asdassdas5</div>
  <script>
    let ul = document.querySelector("ul")
    ul.addEventListener("click",e=>{
      if(e.target.nodeName === "LI"){
        document.querySelector('.active').classList.remove("active")
        document.querySelector(`div:nth-of-type(${e.target.dataset.id})`).classList.add("active")
      }
    })
    window.addEventListener('scroll',e=>console.log(window.scrollY))
  </script>
</body>
</html>